#ifndef _ConnectionManager
#define _ConnectionManager

#include "Connection.h"


namespace tlnet {

class ConnectionManager {
public:
	Connection *head, *curr;

	// insure thread-safe
	HANDLE mutex;
	HANDLE hReady;

	// Constructor
	ConnectionManager(HANDLE hReady);
	// Deconstructor
	~ConnectionManager();

	// Add a new Connection
	Connection* add(void);
	// Del the specified Connection
	bool del(Connection* /*conn*/);

	// get the next Connection*
	Connection* getNext();
	// reset getNext() back to first node
	void reset();
};

}

#endif // _ConnectionManager